
#include "goodinfo.h"
#include "QDebug"

GoodInfo::GoodInfo():
    good_id(""),
    good_name(""),
    cost_price(0),
    sale_price(0),
    inventory(0),
    img_name(""),
    description("")
{

}

void GoodInfo::PrintData(QString title)
{
    if(!title.isEmpty()) qDebug() << QString("title: %1").arg(title);
    qDebug() << QString(" good_id:   %1").arg(good_id);
    qDebug() << QString(" cost_price:   %1").arg(good_name);
    qDebug() << QString(" cost_price:   %1").arg(QString::number(cost_price));
    qDebug() << QString(" sale_price:   %1").arg(QString::number(sale_price));
    qDebug() << QString(" inventory:   %1").arg(QString::number(inventory));
    qDebug() << QString(" img_name:   %1").arg(img_name);
    qDebug() << QString(" description:   %1").arg(description);
}
